package com.novel.base.constants;

import lombok.Getter;

/**
 * CustomExceptionEnum
 * 自定义的异常枚举
 *
 * @author 樊温军
 * @date 2025/3/24 下午3:21
 */
@Getter
public enum CustomExceptionEnum {
    NON_ACCOUNT(1001, "non account", "账号不存在"),
    ERROR_USERNAME_PASSWORD(1002, "error username password", "用户名或密码错误"),
    LOCK_ACCOUNT(1003, "lock account", "账号已被锁定"),
    ERROR_VERIFY_CODE(1004, "error verify code", "验证码错误"),
    NON_VERIFY_CODE(1005, "non verify code", "验证码不存在"),
    NON_USERNAME(1006, "non username", "用户名不存在"),
    NON_PASSWORD(1007, "non password", "密码不存在"),
    NON_ROLE(1008, "non role", "角色不存在"),
    NON_PERMISSION(1009, "non permission", "权限不存在"),
    NON_TENANT(1010, "non tenant", "租户不存在"),
    TOKEN_EXPIRED(1011, "token expired", "token已过期"),
    NON_TOKEN(1012, "non token", "token不存在"),
    NOT_AUTHORIZED(1013, "not authorized", "没有权限"),
    EMPTY_USERNAME(1014, "empty username", "请输入用户名"),
    EMPTY_PASSWORD(1015, "empty password", "请输入密码"),
    EMPTY_GRANT_TYPE(1016, "empty grant", "请输入授权码"),
    EMPTY_TENANT_ID(1017, "empty tenant", "请输入租户"),
    USERNAME_EXIST(1018, "username exist", "用户名已存在"),
    NOT_API_AUTH(1019, "not api sa", "没有接口权限");

    private final int statusCode;
    private final String errorCode;
    private final String errorMessage;

    CustomExceptionEnum(int statusCode, String errorCode, String errorMessage) {
        this.statusCode = statusCode;
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

}
